home *** CD-ROM | disk | FTP | other *** search
/ DOpus Plus / DOpus Plus.iso / Tutorial / C Guide / RndPic_module / includes / Project.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-09-20  |  2.8 KB  |  141 lines

  1.  
  2. #include <dos.h>
  3. #include <clib/alib_protos.h>
  4. #include <proto/dos.h>
  5. #include <proto/asl.h>
  6. #include <proto/exec.h>
  7. #include <proto/utility.h>
  8. #include <proto/gadtools.h>
  9. #include <proto/intuition.h>
  10. #include <proto/rexxsyslib.h> 
  11. #include <dos/exall.h>
  12. #include <dos/dostags.h>
  13. #include <exec/memory.h>
  14. #include <exec/execbase.h>
  15.  
  16. /* catalog file */
  17. #define  CATCOMP_NUMBERS
  18. #include "includes/buildin.strings"
  19.  
  20. #define  _DOPUS_MODULE_DEF
  21. #include <dopus/modules.h>
  22.  
  23. /* contains some replacements for string functions - by Dirk Stoecker */
  24. #define  SDI_TO_ANSI
  25. #include "special/sdi_std.h"
  26.  
  27. /********************************************************************/
  28.  
  29. #define VERSION_STRING "RndPic.module 1.3 © Helmut Hummel\0"
  30.  
  31. #define COMMAND_0      "RndPicPrefs"
  32. #define COMMAND_1      "RndPic"
  33.  
  34. #define CONFIG_FILE    "DOpus5:Settings/RndPic.prefs"
  35. #define TEST_CONFIG    "T:RndPic.prefs"
  36.  
  37. /* precision flags */
  38. #define CENTER_PIC     1 << 0
  39. #define TILE_PIC       1 << 1
  40. #define NO_FIT         1 << 3
  41. #define BAD_FIT        1 << 4
  42. #define MIDDLE_FIT     1 << 5
  43. #define GOOD_FIT       1 << 6
  44. #define BEST_FIT       1 << 7
  45.  
  46. #define RANDOM_ENABLED 1 << 8
  47.  
  48. /* other flags */
  49. #define COPY_MODE      1 << 0
  50. #define CYCLE_MIDDLE   1 << 8 
  51. #define STARTUP        1 << 9
  52.  
  53. /********************************************************************/
  54.  
  55. /* the block which contains the paths and flags */
  56. typedef struct
  57. {   
  58.     ULONG flags;
  59.     char path[256];   
  60. }   RndPrefsData;
  61.  
  62. /* timeblock for command mode */ 
  63. typedef struct
  64. {
  65.     ULONG startdelay;
  66.     ULONG middledelay;
  67. }   DelayBlock;
  68.  
  69. /* summay of all prefs */
  70. typedef struct
  71. {
  72.     RndPrefsData rpd[4];
  73.     DelayBlock   db;
  74. }   PrefsData;
  75.  
  76. /* data for the process to send the commands */
  77. typedef struct
  78. {
  79.     ULONG a4;
  80.     struct Library *library;
  81.     struct Library *module;
  82.     IPCData *ipc;
  83.     PrefsData pd;
  84.     struct MsgPort *source;
  85.     struct MsgPort *receiver;
  86.     struct RexxMsg *rmsg;
  87. }   PassData;
  88.  
  89. /* preferences data */
  90. typedef struct
  91. {
  92.     IPCData *ipc;
  93.     ULONG running;
  94.     ULONG misc;
  95.     
  96.     struct Window *prefswin;
  97.     ObjectList *olist;        // the global list
  98.     ObjectList *modelist;     // the swap list
  99.     GL_Object *cur;
  100.     
  101.     PopUpMenu popmenu;
  102.     PopUpItem *popitem;
  103.     
  104.     struct Gadget *gads[3];
  105.     
  106.     struct IntuiMessage *imsg;
  107.        
  108.     PrefsData pd;
  109.        
  110.     char buffer[256];
  111.     char puffer[256];
  112.     DOpusCallbackInfo dc;
  113. }   RPData;
  114.     
  115. /* data for the "working" process */
  116. typedef struct
  117. {
  118.     PrefsData pd;
  119.     Att_List *dirlist;
  120.     
  121.     struct FileInfoBlock *fib;
  122.     BPTR lock;
  123.     LONG more;
  124.     ULONG count;
  125.             
  126.     struct ExAllData *ead;
  127.     struct ExAllControl *eac;
  128.             
  129.     char buffer[256];
  130.     char puffer[256];
  131.     char mem[4096]; 
  132.        
  133.     struct MsgPort *rport;
  134.     IPCData *sender;
  135.           
  136. }   RndData;
  137.  
  138. extern APTR mempool; // from modinit.c
  139.  
  140.     
  141.